home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 November / macformat-043.iso / mac / Shareware Plus / Developers / OpenStack Rinaldi Collection / openstack-rinaldi-lib / FullText 2.1 (US) / FullText 2.1 (US).rsrc / HELP_5635 next >
Encoding:
Text File  |  1996-01-09  |  4.4 KB  |  83 lines

  1.  
  2.  
  3.                                              FullText 2.1
  4.  
  5.                                          by Frédéric RINALDI
  6.  
  7.  
  8. DESCRIPTION
  9.   FullText allows to transfer full-styled text between two fields (formerly done by two separate XCMDs GetFullText & SetFullText).
  10.  
  11. SYNTAX
  12.          FullText <action>[,<field descriptor>[,<start char>[,<end char>]]]
  13.  
  14. PARAMETERS
  15.    <action> defines the action to perform. It can be "G[et]", "S[et]" or "C[lear]".
  16.  
  17.    <field descriptor> is a litteral string containing any valid field descriptor (even lying on another card than current one), only necessary with "Get" or "Set" actions. Don't forget to enclose it in quotes, in order for it not to be interpreted by HyperCard when the XCMD is called. If you want to use the field name, you will use :
  18.  
  19.         FullText "Get","cd fld" && quote & "Name" & quote
  20.  
  21.    <start char> and <end char> are two optional integers, defining the starting and ending target characters of the field.
  22.    Depending on the action, those two parameters will give the following behaviour :
  23.  
  24.     <action>    <start char>  <end char>    behaviour
  25.     --------+------------+----------+----------------------------
  26.       "Get"          <none>           <none>      Stores the whole text of field
  27.       "Get"              X               <none>      Stores chars X to end of field
  28.       "Get"              X                   Y          Stores chars X to Y of field
  29.       "Set"          <none>           <none>      Replaces whole text of field
  30.       "Set"              X               <none>      Inserts before char X of field
  31.       "Set"              X                   Y          Replaces chars X to Y of field
  32.  
  33. Hint:
  34.    If you want to insert stored text at the end of destination field, simply use a large <start char> value (30000).
  35.  
  36.    Using "!", "?" and "=" as first parameter will return an online help (resp. copyright,  syntax and output).
  37.  
  38. USING
  39.    The XCMD (with "Get" action) creates a global variable named FullTextHandle that contains the value of the temporary styled text handle stored in memory. 
  40.  
  41.         Don't change its value by yourself, or you may crash your Mac.
  42.  
  43.    Meanwhile, you can test its content to know if you're ready to perform a "Set" action, it should be ≠ empty in this case.
  44.  
  45.    Once "Get" has been performed, you can use the stored styled text as many times as necessary to put it or insert it into another field, which even lies on a different card of the stack. If you need to use a field from a different stack, first go it and then only use the XCMD.
  46.  
  47.     When text moving is completely done, don't forget to call the XCMD with "Clear" in order to purge memory from stored styled text and empty the FullTextHandle global variable. This purge is also automatically done if you call "Get" once again.
  48.  
  49. ERRORS
  50.    If an error occurs, FullText can return :
  51.      "Error : Parameter is not a field descriptor"
  52.      "Error : Field not found"
  53.      "Error : Out of memory"
  54.      "Error : FullText requires HC 2.0"
  55.      "Error : Missing or empty action parameter"
  56.      "Error : Bad action parameter"
  57.      "Error : Missing or empty field parameter"
  58.      "Error : Parameter 2 & 3 must be integer > 0"
  59.      "Error : End char must be ≥ start char"
  60.      "Error : Must first use GetFullText"
  61.      "Error : Couldn't empty FullTextHandle global"
  62.      "Error : Couldn't get field"
  63.      "Error : Couldn't set FullTextHandle global"
  64.      "Error : Couldn't set destination field"
  65.      "Error : Cannot exceed 30000 chars in destination field"
  66.  
  67. HISTORY
  68. 2.1                                                                                         07/22/93
  69. • Added limit test for destination field
  70.  
  71. 2.0                                                                                         03/22/93
  72. • Merged GetFullText & SetFullText XCMDs in a single XCMD
  73. • Capture/restore is now possible on/to a field being on another card
  74. • Multiple restore allowed whith the same capture
  75. --------------------------------------------------------------------
  76.    All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :
  77.  
  78.                    FullText XCMD © Frederic Rinaldi, 1989…1993.
  79.  
  80.    Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses:
  81.  
  82. AppleLink: RINALDI1   CalvaCom : FR10    Compuserve : 71170,2111
  83.                Internet : RINALDI1@APPLELINK.APPLE.COM